package com.demo.chapter6collect;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**发票明细
 * @author dell
 *
 */
@SuppressWarnings("serial")
public class InvoiceDetail implements Serializable {

	private Long invoiceDetailId;
	private Long invoiceId;//发票id
	private Integer paymentId;//消费编号
	private InvoiceDetailClassEnum invoiceClassId;//发票内容类别ID
	private Integer productId;//商品ID，-1就是邮寄费，不是-1就是正常商品
	private Integer productNum;//商品数量
	private String invoiceDetailName;//发票明细名称
	private Date addTime;//添加时间
	private BigDecimal productTaxprice;//单价（税前）
	private BigDecimal productPrice;//单价（税后）
	private BigDecimal productTaxmoney;//税前总金额
	private BigDecimal productMoney;//税后总金额

	public Long getInvoiceDetailId() {
		return invoiceDetailId;
	}
	public void setInvoiceDetailId(Long invoiceDetailId) {
		this.invoiceDetailId = invoiceDetailId;
	}
	public Long getInvoiceId() {
		return invoiceId;
	}
	public void setInvoiceId(Long invoiceId) {
		this.invoiceId = invoiceId;
	}
	public Integer getPaymentId() {
		return paymentId;
	}
	public void setPaymentId(Integer paymentId) {
		this.paymentId = paymentId;
	}
	public InvoiceDetailClassEnum getInvoiceClassId() {
		return invoiceClassId;
	}
	public void setInvoiceClassId(InvoiceDetailClassEnum invoiceClassId) {
		this.invoiceClassId = invoiceClassId;
	}
	public Integer getProductId() {
		return productId;
	}
	public void setProductId(Integer productId) {
		this.productId = productId;
	}
	public Integer getProductNum() {
		return productNum;
	}
	public void setProductNum(Integer productNum) {
		this.productNum = productNum;
	}
	public String getInvoiceDetailName() {
		return invoiceDetailName;
	}
	public void setInvoiceDetailName(String invoiceDetailName) {
		this.invoiceDetailName = invoiceDetailName;
	}
	public Date getAddTime() {
		return addTime;
	}
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}
	public BigDecimal getProductTaxprice() {
		return productTaxprice;
	}
	public void setProductTaxprice(BigDecimal productTaxprice) {
		this.productTaxprice = productTaxprice;
	}
	public BigDecimal getProductPrice() {
		return productPrice;
	}
	public void setProductPrice(BigDecimal productPrice) {
		this.productPrice = productPrice;
	}
	public BigDecimal getProductTaxmoney() {
		return productTaxmoney;
	}
	public void setProductTaxmoney(BigDecimal productTaxmoney) {
		this.productTaxmoney = productTaxmoney;
	}
	public BigDecimal getProductMoney() {
		return productMoney;
	}
	public void setProductMoney(BigDecimal productMoney) {
		this.productMoney = productMoney;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((invoiceDetailId == null) ? 0 : invoiceDetailId.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		InvoiceDetail other = (InvoiceDetail) obj;
		if (invoiceDetailId == null) {
			if (other.invoiceDetailId != null)
				return false;
		} else if (!invoiceDetailId.equals(other.invoiceDetailId))
			return false;
		return true;
	}

}
